package sv.gob.mh.dgii.model;

// Generated Aug 8, 2008 3:09:03 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

/**
 * EdRubroConceptual generated by hbm2java
 */
@Entity
@Table(name = "ED_RUBRO_CONCEPTUAL", schema = "EDADEPUDOC", uniqueConstraints = @UniqueConstraint(columnNames = {
		"C_RUBRO_CONCEPTUAL", "C_FORMULARIO", "C_VERSION" }))
@SequenceGenerator(name = "SEQ_ED_RUBRO_CONCEPTUAL", sequenceName = "SEQ_ED_RUBRO_CONCEPTUAL")
public class EdRubroConceptual implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 5838485587019345023L;
	
	private Integer nrubroConceptual;
	private TbFormulariosVersiones tbFormulariosVersiones;
	private TbObligacion tbObligacion;
	private TbRubroConceptual tbRubroConceptual;
	private String cusuario;
	private Date fhingreso;
	private Date fhmodificacion;
	private Set<EdRubroConceptualExpr> edRubroConceptualExprs = new HashSet<EdRubroConceptualExpr>(
			0);

	public EdRubroConceptual() {
	}

	public EdRubroConceptual(Integer nrubroConceptual,
			TbFormulariosVersiones tbFormulariosVersiones,
			TbRubroConceptual tbRubroConceptual) {
		this.nrubroConceptual = nrubroConceptual;
		this.tbFormulariosVersiones = tbFormulariosVersiones;
		this.tbRubroConceptual = tbRubroConceptual;
	}

	public EdRubroConceptual(Integer nrubroConceptual,
			TbFormulariosVersiones tbFormulariosVersiones,
			TbObligacion tbObligacion, TbRubroConceptual tbRubroConceptual,
			String cusuario, Date fhingreso, Date fhmodificacion,
			Set<EdRubroConceptualExpr> edRubroConceptualExprs) {
		this.nrubroConceptual = nrubroConceptual;
		this.tbFormulariosVersiones = tbFormulariosVersiones;
		this.tbObligacion = tbObligacion;
		this.tbRubroConceptual = tbRubroConceptual;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.fhmodificacion = fhmodificacion;
		this.edRubroConceptualExprs = edRubroConceptualExprs;
	}

	@Id
	@Column(name = "N_RUBRO_CONCEPTUAL", unique = true, nullable = false, precision = 4, scale = 0)
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ_ED_RUBRO_CONCEPTUAL")
	public Integer getNrubroConceptual() {
		return this.nrubroConceptual;
	}

	public void setNrubroConceptual(Integer nrubroConceptual) {
		this.nrubroConceptual = nrubroConceptual;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumns( {
			@JoinColumn(name = "C_FORMULARIO", referencedColumnName = "C_FORMULARIO", nullable = false),
			@JoinColumn(name = "C_VERSION", referencedColumnName = "C_VERSION", nullable = false) })
	public TbFormulariosVersiones getTbFormulariosVersiones() {
		return this.tbFormulariosVersiones;
	}

	public void setTbFormulariosVersiones(
			TbFormulariosVersiones tbFormulariosVersiones) {
		this.tbFormulariosVersiones = tbFormulariosVersiones;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "C_OBLIGACION")
	public TbObligacion getTbObligacion() {
		return this.tbObligacion;
	}

	public void setTbObligacion(TbObligacion tbObligacion) {
		this.tbObligacion = tbObligacion;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "C_RUBRO_CONCEPTUAL", nullable = false)
	public TbRubroConceptual getTbRubroConceptual() {
		return this.tbRubroConceptual;
	}

	public void setTbRubroConceptual(TbRubroConceptual tbRubroConceptual) {
		this.tbRubroConceptual = tbRubroConceptual;
	}

	@Column(name = "C_USUARIO", length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_MODIFICACION", length = 7)
	public Date getFhmodificacion() {
		return this.fhmodificacion;
	}

	public void setFhmodificacion(Date fhmodificacion) {
		this.fhmodificacion = fhmodificacion;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "edRubroConceptual")
	public Set<EdRubroConceptualExpr> getEdRubroConceptualExprs() {
		return this.edRubroConceptualExprs;
	}

	public void setEdRubroConceptualExprs(
			Set<EdRubroConceptualExpr> edRubroConceptualExprs) {
		this.edRubroConceptualExprs = edRubroConceptualExprs;
	}

}
